/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package cn.ac.iie.di.global;

import java.util.concurrent.atomic.AtomicInteger;

/**
 *
 * @author Austin
 */
public class test {
    public static void main(String[] args) {
        AtomicInteger ai = new AtomicInteger(0);
        while (true) {            
            ai.incrementAndGet();
            if(ai.get()>=1000){
                ai.set(0);
            }
            System.out.println(ai.get());
        }
    }
}
